#ifndef HTTPD_INCLUDE_STACK_H
#define HTTPD_INCLUDE_STACK_H

#include "list.h"

typedef struct stack {
    int element_num;
    struct list *node;
} *pstack;

extern struct stack *create_stack(void);
extern void destroy_stack(struct stack *s);
extern int push(struct stack *s, const void *value, int size);
extern void pop(struct stack *s);
extern const void *top(const struct stack *s);
extern int is_empty(const struct stack *s);
extern int is_full(const struct stack *s);
extern int get_element_num(const struct stack *s);

#endif  /* HTTPD_INCLUDE_STACK_H */
